package com.xu.cloud.auth.pojo.convert;

import com.xu.cloud.auth.pojo.bo.OAuth2BO;
import com.xu.cloud.auth.pojo.bo.OAuth2GetAccessTokenReqBO;
import com.xu.cloud.auth.pojo.domain.CfgThirdPartyLoginDO;
import org.mapstruct.Mapper;
import org.mapstruct.MappingConstants;
import org.mapstruct.factory.Mappers;

/**
 * @author xuguan
 * @since 2025/2/26
 */
@Mapper(componentModel = MappingConstants.ComponentModel.SPRING)
public interface OAuth2Converter {
    OAuth2Converter INSTANCE = Mappers.getMapper(OAuth2Converter.class);

    OAuth2BO do2Bo(CfgThirdPartyLoginDO cfgThirdPartyLoginDo);

    CfgThirdPartyLoginDO bo2Do(OAuth2BO auth2Bo);

    OAuth2GetAccessTokenReqBO bo2ReqBo(OAuth2BO auth2Bo);
}
